<?php
class RM_PickupDropoff_Object implements RM_Others_Object_Interface
{
    /**
     * @var RM_PickupDropoff_Row
     */
    protected $_pickupRow;
    protected $_value;
    protected $_price = 0;

    public function __construct(RM_PickupDropoff_Row $pickupDropoffRow, $price, $value)
    {
        $this->_pickupRow = $pickupDropoffRow;
        $this->_price = $price;
        $this->_value = $value;
    }

    public function getValue()
    {
        return $this->_value;
    }

    public function getName($iso = null)
    {
        return $this->_pickupRow->getName($iso);
    }

    public function getPrice()
    {
        return $this->_price;
    }

    public function getID()
    {
        return $this->_pickupRow->id;
    }

    public function toArray($iso = null)
    {
        $array = $this->_pickupRow->toArray($iso);
        $array['price'] = $this->getPrice();
        $array['value'] = $this->getValue();
        return $array;
    }
}
